<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <script type="text/javascript">
            function doPopupWindow(obj) {
                var pkid = obj.parentNode.parentNode.childNodes[0].innerHTML;
                popupwindow = window.open("contractDetlForm.xhtml?pkid=" + pkid, "popupwindow", "height=600,width=800,left=200,top=100,toolbar=no,menubar=no,scrollbars=yes,location=no");
                popupwindow.focus;
            }
        </script>
        <style type="text/css">
            .input-col-m {
                width: 60px;
            }

            .input-col-l {
                width: 80px;
            }

            .input-col-xxl {
                width: 1%;
                text-align: right;
            }

            .col-95 {
                text-align: right;
            }

            .col-5 {
                text-align: left;
            }
        </style>

    </ui:define>

    <ui:define name="content">
        <div style="margin:5px;">
            <p:messages id="msgs" showDetail="false"/>
            <h:form id="form">
                <p:growl id="msgs" showDetail="false"/>
                <p:panel id="query" header="发送已支付计划付款">
                    <p:menubar>
                        <p:menuitem type="push" value="多笔发送" icon="ui-icon ui-icon-document"
                                    action="#{rsPlanCtrlTxnSendAction.onSend}" update="msgs, pdt" ajax="true"/>
                    </p:menubar>
                </p:panel>
                <p:ajaxStatus style="height:18px;text-align:center">
                    <f:facet name="start">
                        <h:graphicImage value="/images/ajaxloadingbar.gif"/>
                    </f:facet>
                    <f:facet name="complete">
                        <h:outputText value=""/>
                    </f:facet>
                </p:ajaxStatus>
                <p:dataTable id="pdt" style="width:100%;"
                             dynamic="true" selection="#{rsPlanCtrlTxnSendAction.selectedRecords}"
                             value="#{rsPlanCtrlTxnSendAction.planCtrlList}" var="record"
                             paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                             paginator="true" rows="15" paginatorPosition="bottom"
                             rowsPerPageTemplate="100,50,30,15,5" rowKey="#{record.pkId}"
                             emptyMessage="数据记录为空...">
                    <p:column style="display:none;" headerText="pkid">
                        <h:outputText value="#{record.pkId}"/>
                    </p:column>
                    <p:column selectionMode="multiple"/>

                    <p:column headerText="账户名称">
                        <h:outputText value="#{record.companyName}"/>
                    </p:column>

                    <p:column headerText="监管账号" style="text-align:center">
                        <h:outputText value="#{record.accountCode}"/>
                    </p:column>

                    <p:column headerText="计划控制编号" style="text-align:center">
                        <h:outputText value="#{record.planCtrlNo}"/>
                    </p:column>

                    <p:column headerText="计划日期" style="text-align:center">
                        <h:outputText value="#{record.planDate}">
                        </h:outputText>
                    </p:column>

                    <p:column headerText="用款说明">
                        <h:outputText value="#{record.planDesc}"/>
                    </p:column>

                    <p:column headerText="对方账户名">
                        <h:outputText value="#{record.toAccountName}"/>
                    </p:column>
                    <p:column headerText="对方账号">
                        <h:outputText value="#{record.toAccountCode}"/>
                    </p:column>
                    <p:column headerText="对方账户开户行">
                        <h:outputText value="#{record.toHsBankName}"/>
                    </p:column>
                    <p:column headerText="计划金额">
                        <h:outputText value="#{record.plAmount}" style="float: right">
                            <f:convertNumber pattern="#,###,###,##0.00"/>
                        </h:outputText>
                    </p:column>
                    <p:column headerText="付款标志">
                        <h:outputText value="#{rsPlanCtrlAction.adjustFlag.valueOfAlias(record.adjustFlag).title}"/>
                    </p:column>

                </p:dataTable>
            </h:form>
        </div>
    </ui:define>

</ui:composition>